{extend name="index_base" /}
{block name="seo"}
<title>{$site_config['site_title']} - {$site_config['seo_title']}</title>
<meta name="keywords" content="{$site_config['seo_keyword']}">
<meta name="description" content="{$site_config['seo_description']}">
<link rel="stylesheet" href="__HOME__/css/index.css">
{/block}
{block name="body"}
<article class="content-true">
    <section class="container layui-clear">
        <div class="index-container layui-clear">
            {if in_array(1, $homnePageShowArr)}
            <div class="hot-top layui-clear">
                <i class="tg-ph"></i>
                <div class="left">
                    <a class="hover">近期投稿</a>
                    <a>本月冠军</a>
                </div>
                <div class="right">
                    <div class="right-overflow">
                        <div class="right-main">
                            <ul class="layui-clear top-ul">
                                {volist name="newPostTop" id="vo"}
                                <li><a href="/person/{$vo.uuid}.html" title="最新投稿通过时间：{$vo.publish_time}">
                                    <div class="list-img"><img src="{$vo.avatar}"  onerror="this.src='/public/images/userhead/default.png';"/></div>
                                    <h3>{$vo.nickname}</h3></a>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                        <div class="right-main">
                            <ul class="layui-clear top-ul">
                                {volist name="monthPostTop" id="vo"}
                                <li><a href="/person/{$vo.uuid}.html" title="本月投稿共通过：{$vo.count}篇">
                                    <div class="list-img"><img src="{$vo.avatar}"  onerror="this.src='/public/images/userhead/default.png';"/></div>
                                    <h3>{$vo.nickname}</h3></a>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            {/if}
            {include file="index/gg"}
            {include file="index/gg6"}
            <div class="new-position">
                <div class="left">
                    <div class="layui-carousel" id="index-lb">
                        <div carousel-item="">
                            {volist name="carousel" id="vo"}
                            <div><a href="/html/{$vo.id}.html"><img src="{$vo.cover_img}" onerror="this.src='__HOME__/images/no-img1.png';"></a></div>
                            {/volist}
                        </div>
                    </div>
                    <div class="index-login">
                        <div class="title">
                            我的信息
                        </div>
                        <div class="info layui-clear">
                            <!-- 登录前 -->
                            <div class="lg_no">
                                <a href="/user/index.html">
                                    <img src="__HOME__/images/a3o.png" class="user-img" />
                                </a>
                                <div class="u-info">
                                    <h3>您还没有登录哦~</h3>
                                    <a onclick="openLoginK();">立即登录</a>
                                </div>
                            </div>

                            <!-- 登录后 -->
                            <div class="lg_tr">
                                <a href="/user/index.html">
                                    <img src="__PUBLIC__/images/userhead/default.png" onerror="this.src='__HOME__/images/a3o.png'" class="user-img"/>
                                </a>
                                <div class="u-info">
                                    <h3 class="u_nick">--</h3>
                                    <a href="/user/tg.html">我要投稿</a>
                                </div>
                            </div>

                        </div>
                        <div class="intr">
                            <h3>投稿拿奖励</h3>
                            <span>支持在线投稿<br/>优质教程一律送现金</span>
                        </div>
                    </div>
                </div>
                <div class="right">
                    <div class="title">最近更新<a href="/list/all.html" class="iconfont"><i class="layui-icon layui-icon-right"></i></a></div>
                    <div class="r-content">
                        <ul class="layui-clear">
                            {volist name="newArticles" id="vo"}
                            <li>
                                <a href="<?php echo($vo['out_link']?:'/html/'.$vo['id'].'.html'); ?>" target="_blank" title="{$vo.title}">{if $vo.is_ad}<i class="ad">广告</i>{elseif $vo.is_essence/}<i class="jx"></i>{else /}{/if}<span style="color:{$vo.color}">{$vo.title}</span></a>
                                <font <?php if($vo['is_ad'] || date('m-d',strtotime($vo['publish_time']))==date('m-d')) echo('class="new-time"'); ?>>{if $vo.is_ad}{:date('m-d')}{else /}{:date('m-d',strtotime($vo['publish_time']))}{/if}</font>
                            </li>
                            {/volist}
                        </ul>
                        <div class="list-loading">
                            <div class="loadding2">
                                <div class="circ1"></div>
                                <div class="circ2"></div>
                                <div class="circ3"></div>
                                <div class="circ4"></div>
                            </div>
                        </div>
                    </div>
                    <div class="page layui-clear" data-nowpage="1">
                        <div class="top disabled">上一页</div>
                        <b class="cfx"></b>
                        <div class="bottom">下一页</div>
                    </div>
                </div>
            </div>
            {if $ad2.open}
            <ul class="three layui-clear">
                {volist name="ad2.list" id="vo"}
                <li>
                    <img src="{$vo.banner_path}"/>
                    <div>
                        <h3>{$vo.title}</h3>
                        <span>{$vo.description}</span>
                    </div>
                    <a target="_blank" href="{$vo.link}" class="go">去看看</a>
                </li>
                {/volist}
            </ul>
            {/if}
            <div class="scoend">
                <div class="left">
                    <div class="title">
                        人气榜单
                        <div class="types">
                            <a class="hover">本月冠军</a>
                            <a>总榜之巅</a>
                        </div>
                    </div>
                    <div class="showtopw">
                        <div class="showtop layui-clear">
                            <ul class="xuhaoul">
                                {volist name="monthRank" id="vo"}
                                <li><a href="/html/{$vo.id}.html"> <i>{$key+1}</i> {$vo.title} </a></li>
                                {/volist}
                            </ul>
                            <ul class="xuhaoul">
                                {volist name="totalRank" id="vo"}
                                <li><a href="/html/{$vo.id}.html"> <i>{$key+1}</i> {$vo.title} </a></li>
                                {/volist}
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="right">
                    <!-- 随机抽取近10天内的4个资源 -->
                    <div class="title">
                        随机推荐
                        <a href="/list/2.html" class="iconfont icon-gengduo"></a>
                    </div>
                    <ul class="twdd">
                        {volist name="recommend" id="vo" length="4"}
                        <li>
                            <a href="/html/{$vo.id}.html" class="layui-clear">
                                <div class="list-img">
                                    <img src="{$vo.cover_img}" onerror="this.src='__HOME__/images/no-img1.png';"/>
                                </div>
                                <div class="info">
                                    <h3>{$vo.title}</h3>
                                    <font class="">{$vo.publish_time}</font>
                                </div>
                            </a>
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
            <div class="top-list">
                <div class="title">
                    板块更新
                    <div class="type">
                        <a class="hover"><?php echo implode(" / ",array_column($categoryTeam1,'alias_name')); ?></a>
                        <a><?php echo implode(" / ",array_column($categoryTeam2,'alias_name')); ?></a>
                    </div>
                </div>
                <div class="tpl-tr-wai">
                    <div class="tpl-tr layui-clear">
                        <div class="list-top">
                            {volist name="categoryTeam1" id="vo"}
                            <ul>
                                {volist name="vo.artlists" id="voo" key="k"}
                                <li>
                                    <a href="/html/{$voo.id}.html" class="layui-clear">
                                        {if $k eq 1}
                                        <div class="list-img"><img src="{$voo.cover_img}" onerror="this.src='__HOME__/images/no-img1.png';"/></div>
                                        {else /}
                                        <font>[ {$vo.name} ]</font>
                                        {/if}
                                        <span>{$voo.title}</span>
                                    </a>
                                </li>
                                {/volist}
                            </ul>
                            {/volist}
                        </div>
                        <div class="list-top">
                            {volist name="categoryTeam2" id="vo"}
                            <ul>
                                {volist name="vo.artlists" id="voo" key="k"}
                                <li>
                                    <a href="/html/{$voo.id}.html" class="layui-clear">
                                        {if $k eq 1}
                                        <div class="list-img"><img src="{$voo.cover_img}" onerror="this.src='__HOME__/images/no-img1.png';"/></div>
                                        {else /}
                                        <font>[ {$vo.name} ]</font>
                                        {/if}
                                        <span>{$voo.title}</span>
                                    </a>
                                </li>
                                {/volist}
                            </ul>
                            {/volist}
                        </div>
                    </div>
                </div>
            </div>

            <div class="other layui-clear" {if !in_array(2, $homnePageShowArr)} style="display: none" {/if}>
                <div class="left">
                    <div class="title">实时投稿</div>
                    <ul class="tg-new-list layui-clear">
                        <div class="loadding"><span></span> <span></span> <span></span> <span></span> <span></span></div>
                    </ul>
                </div>
                <div class="right">
                    <div class="title">用户兴趣谱图</div>
                    <div class="xq"
                         data-bl='[{"type":"\u7f51\u7edc\u8f6f\u4ef6","bl":0.3,"url":"\/list\/4.html"},{"type":"\u6d3b\u52a8\u7ebf\u62a5","bl":0.2,"url":"\/list\/5.html"},{"type":"\u5176\u4ed6\u8d44\u6e90","bl":0.1,"url":"\/list\/6.html"},{"type":"\u5b9e\u7528\u6559\u7a0b","bl":0.1,"url":"\/list\/3.html"},{"type":"\u7f51\u7ad9\u6e90\u7801","bl":0.1,"url":"\/list\/2.html"},{"type":"\u6e38\u620f\u8d44\u8baf","bl":0,"url":"\/list\/1.html"}]'></div>
                </div>
            </div>
        </div>
    </section>
</article>


<!--友情链接区域-->
<div class="friends-link">
    <h3 class="container">友情链接：<a target="_blank" href="/about/friendlink.html" style="float: right; font-size: 13px; color: #bebebe;">申请友链</a></h3>
    <ul class="layui-clear container">
        <li><a href="https://www.laysns.com" target="_blank">Laysns</a></li>
        {volist name="friendlinks" id="vo"}
        <li><a href="{$vo.link}" target="_blank">{$vo.title}</a></li>
        {/volist}
    </ul>
</div>
<!--友情链接结束-->

{/block}
{block name="js"}
<script src="__HOME__/js/index.js"></script>
<!-- 首页更新列表模板 -->
<script id="index-list" type="text/html">
    {{#  layui.each(d.list, function(index, item){ }}
    <li>
        <a href="/html/{{item.id}}.html" target="_blank" title="{{item.title}}">
            {{# if(item.is_ad==1){}}
            <i class="ad"></i>
            {{#}}}
            {{# if(item.is_essence==1){}}
            <i class="jx"></i>
            {{#}}}
            {{item.title}}
        </a>
        <font class=" {{# if(formt_md(item.publish_time)==getNowFormatDate()){}}new-time{{#}}}">{{formt_md(item.publish_time)}}</font>
    </li>
    {{#  }); }}
</script>
<!-- 实时投稿互动模板 -->
<script id="tg-hd" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <li>
        <a href="/person/{{item.uuid}}.html" class="user-img"> <img src="{{item.avatar}}"  onerror="this.src='/public/images/userhead/default.png';"/> </a>
        <div>
            <a href="/person/{{item.uuid}}.html"><h3>{{item.nickname}}</h3></a>
            <span>
						 {{#if(item.status==0){}}
                        <b class="wait">
                        等待审核
                             </b>
                    {{#}else if(item.status==1){}}
                        <b class="success">
                        审核通过
                             </b>
                    {{#}else{}}
                        <b class="bad">
                        审核失败
                             </b>
                    {{#}}}
							在{{item.created_at}}投稿了：{{item.title}}
						</span>
        </div>
    </li>
    {{#  }); }}
</script>
{/block}